home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / PAS_0493 / CURSOFF.PAS < prev    next >
Pascal/Delphi Source File  |  1993-04-15  |  1KB  |  44 lines

  1. {─ Fido Pascal Conference ────────────────────────────────────────────── PASCAL ─
  2. Msg  : 246 of 286                                                               
  3. From : Michael Fortson                     1:141/495.0          08 Apr 93  21:41 
  4. To   : Daniel Shapiro                                                            
  5. Subj : cursor?                                                                
  6. ────────────────────────────────────────────────────────────────────────────────
  7.  -=> Quoting Daniel Shapiro to All <=-
  8.  
  9.  DS> I have another one- How do I "hide" the cursor?  So when it is
  10.  DS> waiting for input, I won't see that stupid little blinking cursor
  11.  DS> there... 
  12.  
  13.  
  14. Here's some code that should do it. }
  15.  
  16. procedure CursOff; assembler;    
  17. asm
  18.   mov ah,3       { get cursor }
  19.   xor BX,BX
  20.   int 10h
  21.   or ch,20h    { Make OFF}
  22.   mov ah,1  { set new cursor }
  23.   int 10h
  24. end;
  25.  
  26. procedure CursOn; assembler;
  27. asm
  28.   mov ah,3     { get  cursor }
  29.   xor BX,BX  
  30.   int 10h
  31.   and ch,1fh    { make ON }
  32.   mov ah,1     { set new cursor }
  33.   int 10h
  34. end;
  35.  
  36.  
  37. begin
  38.   Writeln('The cursor will now be turned off');
  39.   CursOff;
  40.   readln;
  41.   Writeln('Turning the cursor back on');
  42.   CursOn;
  43.   readln;
  44. end.